//package com.zhengdongzulin.zuke.app.main.home
//
//import android.content.Intent
//import com.lxj.androidktx.core.*
//import com.zhengdongzulin.zuke.R
//import com.zhengdongzulin.zuke.app.data.ApartmentType
//import com.zhengdongzulin.zuke.app.main.MainActivity
//import com.zhengdongzulin.zuke.base.*
//import com.zhengdongzulin.zuke.ext.start
//import kotlinx.android.synthetic.main.activity_apartment_type.*
//
//
///**
// * jeff
// * 公寓类型
// * 2021-03-27 17:50:47
// */
//class ApartmentTypeActivity : BaseActivity<ApartmentTypeVm>() {
//
//    var mData: MutableList<ApartmentType>? = null
//
//    override fun getLayoutResId(): Int = R.layout.activity_apartment_type
//
//    override fun initVM(): ApartmentTypeVm = getVM(ApartmentTypeVm::class.java)
//
//    override fun initView() {
//
//    }
//
//    override fun initData() {
//        mViewModel.web_account_get_list()
//    }
//
//    override fun initListener() {
//        apartment_type_1.setOnClickListener {
//            if (mData == null || mData?.size == 0) {
//                toast("公寓类型初始化失败")
//                return@setOnClickListener
//            }
//            mShareViewModel.apartmentTypeId.value = mData!![0].id
//            mShareViewModel.apartmentType.value = mData!![0].type
//            var apartmentType = sp().getString("apartmentType", "")
//            if (apartmentType.isNullOrEmpty()) {
//                Intent().start(this@ApartmentTypeActivity, MainActivity::class.java)
//            }else{
//                mShareViewModel.apartmentTypeIsChangeForHome.value = true
//                mShareViewModel.apartmentTypeIsChangeForApartment.value = true
//                mShareViewModel.apartmentTypeIsChangeForFindHouse.value = true
//            }
//            sp().putString("apartmentTypeId", mData!![0].id)
//            sp().putString("apartmentType", mData!![0].type)
//            finish()
//        }
//        apartment_type_2.setOnClickListener {
//            if (mData == null || mData?.size == 0) {
//                toast("公寓类型初始化失败")
//                return@setOnClickListener
//            }
//            mShareViewModel.apartmentTypeId.value = mData!![1].id
//            mShareViewModel.apartmentType.value = mData!![1].type
//            var apartmentType = sp().getString("apartmentType", "")
//            if (apartmentType.isNullOrEmpty()) {
//                Intent().start(this@ApartmentTypeActivity, MainActivity::class.java)
//            }else{
//                mShareViewModel.apartmentTypeIsChangeForHome.value = true
//                mShareViewModel.apartmentTypeIsChangeForApartment.value = true
//                mShareViewModel.apartmentTypeIsChangeForFindHouse.value = true
//            }
//            sp().putString("apartmentTypeId", mData!![1].id)
//            sp().putString("apartmentType", mData!![1].type)
//            finish()
//        }
//    }
//
//    override fun startObserve() {
//        mViewModel.web_account_get_list.observe(this, androidx.lifecycle.Observer {
//            mData = it
//        })
//        mViewModel.web_account_get_list.state.observe(this, getObserver(mViewModel.web_account_get_list))
//    }
//
//}